home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / HyperCard / HyperCard 1.2.2 International / HyperCard Danish (DK-1.2.2) / Idestakke / Baggrundsideer / background_42187.txt < prev    next >
Text File  |  1988-12-19  |  8KB  |  344 lines

  1. -- background: 42187 from stack: in
  2. -- bmap block id: 19051
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on extend
  8.   if the name of this stack contains "Baggrundsideer"
  9.   then
  10.   answer "Opret venligst en ny stak, f√∏r den udvides." with "OK"
  11. else
  12.   answer "Skal der laves nye kort til tre m√•neder?" with "Annuller" or "OK"
  13.   if it is "Annuller" then exit extend
  14.   go to last card of this background
  15.   put getStartDate() into start      --what date to begin on
  16.   if start is "Annuller" then exit extend
  17.   put 60*60*24 into OneDay      --seconds in a day
  18.   put start into it        --a copy
  19.   convert it to long date
  20.   global calcMonth
  21.   put word 1 of item 2 of it into calcMonth
  22.   set name of this bkgnd to calcMonth
  23.   repeat with cnt = 1 to (365 div 4)   --three months
  24.     put start into it        --a copy
  25.     convert it to long date
  26.     put item 1 of it into field "Ugedag"
  27.     put item 2 of it into field "Dato"
  28.     put item 3 of it into field "√Ör"
  29.     add OneDay to start
  30.     doMenu New Card
  31.     upDateBkgnd start  --make a new background if new month
  32.   end repeat
  33.   doMenu "Delete Card"
  34. end if
  35. end extend
  36.  
  37. on upDateBkgnd start
  38.   global calcMonth
  39.   put start into it        --a copy
  40.   convert it to long date
  41.   if word 1 of item 2 of it <> calcMonth then   --if new month
  42.     --create a new background.
  43.     put word 1 of item 2 of it into calcMonth
  44.     doMenu "Cut Card"    --new bkgnd is a copy with only name changed
  45.     go previous card
  46.     put the long name of this card into goodStack
  47.     set lockScreen to true
  48.     go to stack "home"
  49.     --must go to another stack to avoid changing the original bkgnd
  50.     doMenu "Paste Card"
  51.     set name of this background to word 1 of item 2 of it
  52.     doMenu "Cut Card"
  53.     go goodStack
  54.     set lockScreen to false
  55.     doMenu "Paste Card"
  56.     set name of this bkgnd to calcMonth
  57.   end if
  58. end upDateBkgnd
  59.  
  60. function getStartDate
  61. -- end of stack or today, whichever is newer
  62. get field "Dato"
  63. if it is empty then put the short date into it
  64. convert it to seconds    --so we can compare
  65. put the short date into today
  66. convert today to seconds
  67. if today < 2587766400 then
  68.   answer "Indstil Kontrolpanelet til dags dato" with "OK"
  69.   return "Annuller"
  70. end if
  71. if it >= today then return it   --calendar already beyond today
  72. convert it to short date
  73. answer "Startende fra hvilken dato?" with it or the short date or "Annuller"
  74. if it is "Annuller" then return it
  75. convert it to seconds
  76. return it
  77. end getStartDate
  78.  
  79. on openBackground
  80.   push recent card
  81. end openBackground
  82.  
  83.  
  84. -- part 7 (button)
  85. -- low flags: 00
  86. -- high flags: 0000
  87. -- rect: left=321 top=283 right=311 bottom=350
  88. -- title width / last selected line: 0
  89. -- icon id / first selected line: 0 / 0
  90. -- text alignment: 1
  91. -- font id: 0
  92. -- text size: 12
  93. -- style flags: 0
  94. -- line height: 16
  95. -- part name: Opgaver
  96. ----- HyperTalk script -----
  97. on mouseUp
  98.   go card "Opgaver1" of "Kalender"
  99. end mouseUp
  100.  
  101.  
  102.  
  103. -- part 8 (field)
  104. -- low flags: 00
  105. -- high flags: 4000
  106. -- rect: left=59 top=119 right=290 bottom=489
  107. -- title width / last selected line: 0
  108. -- icon id / first selected line: 0 / 0
  109. -- text alignment: 0
  110. -- font id: 3
  111. -- text size: 10
  112. -- style flags: 0
  113. -- line height: 16
  114. -- part name: c
  115.  
  116.  
  117. -- part 9 (button)
  118. -- low flags: 00
  119. -- high flags: 0000
  120. -- rect: left=26 top=281 right=315 bottom=64
  121. -- title width / last selected line: 0
  122. -- icon id / first selected line: 1011 / 1011
  123. -- text alignment: 1
  124. -- font id: 0
  125. -- text size: 12
  126. -- style flags: 0
  127. -- line height: 16
  128. -- part name: Hjem
  129. ----- HyperTalk script -----
  130. on mouseUp
  131.   visual effect iris close
  132.   go "Home"
  133. end mouseUp
  134.  
  135.  
  136.  
  137. -- part 10 (button)
  138. -- low flags: 00
  139. -- high flags: 0000
  140. -- rect: left=420 top=281 right=312 bottom=455
  141. -- title width / last selected line: 0
  142. -- icon id / first selected line: 30696 / 30696
  143. -- text alignment: 1
  144. -- font id: 0
  145. -- text size: 12
  146. -- style flags: 0
  147. -- line height: 16
  148. -- part name: Telefon
  149. ----- HyperTalk script -----
  150. on mouseUp
  151.   get the selection
  152.   if it is empty then get the message
  153.   if it is empty then ask "Ring til hvilket nummer?"
  154.   if it is not empty then
  155.     dial it
  156.   end if
  157. end mouseUp
  158.  
  159.  
  160.  
  161. -- part 11 (button)
  162. -- low flags: 00
  163. -- high flags: 0000
  164. -- rect: left=458 top=280 right=311 bottom=491
  165. -- title width / last selected line: 0
  166. -- icon id / first selected line: 0 / 0
  167. -- text alignment: 1
  168. -- font id: 0
  169. -- text size: 12
  170. -- style flags: 0
  171. -- line height: 16
  172. -- part name: Adresse
  173. ----- HyperTalk script -----
  174. on mouseUp
  175.   get the selection
  176.   visual effect zoom open
  177.   go to "Adresse"
  178.   if it is not empty then find it
  179. end mouseUp
  180.  
  181.  
  182.  
  183. -- part 12 (button)
  184. -- low flags: 00
  185. -- high flags: 0000
  186. -- rect: left=355 top=285 right=310 bottom=383
  187. -- title width / last selected line: 0
  188. -- icon id / first selected line: 0 / 0
  189. -- text alignment: 1
  190. -- font id: 0
  191. -- text size: 12
  192. -- style flags: 0
  193. -- line height: 16
  194. -- part name: Datebook Answer
  195. ----- HyperTalk script -----
  196. on mouseUp
  197.   answer "Dette er en dagskalender" with OK
  198. end mouseUp
  199.  
  200.  
  201.  
  202.  
  203. -- part 13 (button)
  204. -- low flags: 00
  205. -- high flags: 0000
  206. -- rect: left=389 top=285 right=309 bottom=416
  207. -- title width / last selected line: 0
  208. -- icon id / first selected line: 0 / 0
  209. -- text alignment: 1
  210. -- font id: 0
  211. -- text size: 12
  212. -- style flags: 0
  213. -- line height: 16
  214. -- part name: Kalender
  215. ----- HyperTalk script -----
  216. on mouseUp
  217.   set lockscreen to true
  218.   go to "Kalender"
  219.   goSixMonthly the seconds
  220. end mouseUp
  221.  
  222.  
  223.  
  224. -- part 15 (button)
  225. -- low flags: 00
  226. -- high flags: 0000
  227. -- rect: left=229 top=309 right=334 bottom=256
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 1014 / 1014
  230. -- text alignment: 1
  231. -- font id: 0
  232. -- text size: 12
  233. -- style flags: 0
  234. -- line height: 16
  235. -- part name: Prev
  236. ----- HyperTalk script -----
  237. on mouseUp
  238.   visual effect wipe right
  239.   go to previous card
  240. end mouseUp
  241.  
  242.  
  243.  
  244. -- part 16 (button)
  245. -- low flags: 00
  246. -- high flags: 0000
  247. -- rect: left=257 top=308 right=335 bottom=285
  248. -- title width / last selected line: 0
  249. -- icon id / first selected line: 1013 / 1013
  250. -- text alignment: 1
  251. -- font id: 0
  252. -- text size: 12
  253. -- style flags: 0
  254. -- line height: 16
  255. -- part name: Next
  256. ----- HyperTalk script -----
  257. on mouseUp
  258.   visual effect wipe left
  259.   go to next card
  260. end mouseUp
  261.  
  262.  
  263.  
  264. -- part 17 (button)
  265. -- low flags: 00
  266. -- high flags: 0000
  267. -- rect: left=464 top=311 right=336 bottom=495
  268. -- title width / last selected line: 0
  269. -- icon id / first selected line: 1012 / 1012
  270. -- text alignment: 1
  271. -- font id: 0
  272. -- text size: 12
  273. -- style flags: 0
  274. -- line height: 16
  275. -- part name: Return
  276. ----- HyperTalk script -----
  277. on mouseUp
  278.   visual effect iris close
  279.   pop card
  280. end mouseUp
  281.  
  282.  
  283.  
  284. -- part 18 (field)
  285. -- low flags: 00
  286. -- high flags: 0000
  287. -- rect: left=28 top=61 right=84 bottom=199
  288. -- title width / last selected line: 0
  289. -- icon id / first selected line: 0 / 0
  290. -- text alignment: 0
  291. -- font id: 2
  292. -- text size: 18
  293. -- style flags: 0
  294. -- line height: 24
  295. -- part name: Ugedag
  296.  
  297.  
  298. -- part 19 (field)
  299. -- low flags: 00
  300. -- high flags: 0000
  301. -- rect: left=21 top=84 right=118 bottom=215
  302. -- title width / last selected line: 0
  303. -- icon id / first selected line: 0 / 0
  304. -- text alignment: 0
  305. -- font id: 2
  306. -- text size: 24
  307. -- style flags: 0
  308. -- line height: 32
  309. -- part name: Dato
  310.  
  311.  
  312. -- part 20 (field)
  313. -- low flags: 00
  314. -- high flags: 0000
  315. -- rect: left=305 top=25 right=50 bottom=380
  316. -- title width / last selected line: 0
  317. -- icon id / first selected line: 0 / 0
  318. -- text alignment: 0
  319. -- font id: 2
  320. -- text size: 18
  321. -- style flags: 0
  322. -- line height: 24
  323. -- part name: År
  324.  
  325.  
  326. -- part 21 (button)
  327. -- low flags: 00
  328. -- high flags: 8003
  329. -- rect: left=26 top=314 right=329 bottom=72
  330. -- title width / last selected line: 0
  331. -- icon id / first selected line: 0 / 0
  332. -- text alignment: 1
  333. -- font id: 3
  334. -- text size: 9
  335. -- style flags: 0
  336. -- line height: 12
  337. -- part name: Udvid
  338. ----- HyperTalk script -----
  339. on mouseUp
  340.  
  341.   extend
  342. end mouseUp
  343.  
  344.